//
//  YHResponseTip.m
//  YHBaseProject
//
//  Created by yuhang liu on 2022/11/18.
//  Copyright © 2022 lyh. All rights reserved.
//

#import "XMResponseTip.h"

NSString *const kResponseBody = @"responseBody";
NSString *const kErrorDesc = @"errorDesc";
NSString *const kNoNetworkErrorDescStr = @"网络请求失败,请稍后再试";
NSString *const kSameRequestErrorDescStr = @"无效的重复网络请求";
NSString *const kResultDataErrorDescStr = @"返回数据格式错误";
NSString *const kResultCodeSuccessStr = @"200";
NSString *const kResultCodeErrorStr = @"000";


@implementation XMResponseTip

- (void)setCode:(NSString *)code {
    _code = code;
    self.success = ([_code isEqualToString:kResultCodeSuccessStr] || [_code isEqualToString:@"201"]) ? YES : NO;
}

- (void)setupVerifyInfoWithcode:(NSString *)code errorDesc:(NSString *)errorDesc {
    self.code = code;
    self.message = errorDesc;
}

//+ (void)callbackWithCompleteBlock:(void (^)(void))completeBlock {
//    if (completeBlock) {
//        completeBlock();
//    }
//}

@end
